package com.linkhub.oms.admin.modules.order.domain.vo.orderlist;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linkhub.oms.admin.modules.order.domain.vo.OrderAddressVO;
import com.linkhub.oms.admin.modules.order.domain.vo.OrderFulfillmentVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Description: OrderlistVO
 * @Author: echo
 * @Date: 2024/3/29 10:11
 * @Version: 1.0
 */
@Data
@ApiModel(value = "OrderlistVO", description = "OrderlistVO")
public class OrderlistVO implements Serializable {

    @ApiModelProperty(value = "sysShopId")
    private String sysShopId;

    @ApiModelProperty(value = "商店名称")
    private String shopName;

    @ApiModelProperty(value = "平台：1-shopify")
    private Integer platForm;

    @ApiModelProperty(value = "系统orderId")
    private String sysOrderId;

    @ApiModelProperty(value = "平台订单id")
    private String orderNumber;

    @ApiModelProperty(value = "买家邮箱")
    private String email;

    @ApiModelProperty(value = "商品信息,如果订单为拆分订单，该字段为空，需要取子订单的值展示")
    private List<OrderlistLineItemVO> lineItems;

    @ApiModelProperty(value = "订单总金额")
    private String currentTotalPrice;

    @ApiModelProperty(value = "订单地址")
    private OrderAddressVO orderAddress;

    @ApiModelProperty(value = "下单/付款时间")
    private String createdAt;

    @ApiModelProperty(value = "买家备注")
    private String buyerNote;

    @ApiModelProperty(value = "卖家备注")
    private String sellerNote;

    @ApiModelProperty(value = "平台物流方式")
    private List<OrderFulfillmentVO> fulfillments;

    @ApiModelProperty(value = "云途物流单号")
    private String wayBillNumber;

    @ApiModelProperty(value = "买家指定配送方式")
    private String shippingMethod;

    @ApiModelProperty(value = "渠道编码")
    private String channelCode;

    @ApiModelProperty(value = "渠道名称")
    private String channelEName;

    @ApiModelProperty(value = "仓库")
    private String stash;

    @ApiModelProperty(value = "预估运费")
    private String estimatedFreight;

    @ApiModelProperty(value = "对外挂号费")
    private String registrationFreight;

    @ApiModelProperty(value = "币种")
    private String currency;

    @ApiModelProperty(value = "提交履约时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime fulfillmentTime;

    @ApiModelProperty(value = "发货时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime deliveryTime;

    @ApiModelProperty(value = "订单状态：1-未付款;2-已付款;3-部分退款;4-已退款;5-已取消；10-有货；11-无货；12-待预报；13-预报失败；20-shipO审核中;21-待打包；22-已出库；30-已驳回;40-已发货;41-已签收")
    private Integer orderStatus;

    @ApiModelProperty(value = "客户订单状态：0-无状态;21-有货；22-无货；")
    private Integer customerOrderStatus;

    @ApiModelProperty(value = "订单商品库存标识：-1-无状态；0-缺货;1-有货;  与customerOrderStatus区别为此字段标记订单有货无货状态，customerOrderStatus为商家查看列表时筛选用，方便以后拓展其他状态")
    private Integer orderStockStatus;

    @ApiModelProperty(value = "订单状态描述")
    private String orderStatusDesc;

    @ApiModelProperty(value = "拆分标识：0-否;1-是;")
    private Integer splitFlag;

    @ApiModelProperty(value = "原拆分订单的子订单")
    private List<OrderlistVO> subOrders;

    @ApiModelProperty(value = "员工驳回原因")
    private String refusalReason;

    @ApiModelProperty(value = "员工订单失败原因——外部系统返回")
    private String failReason;
}
